﻿<UserControl x:Class="NicoView.View.NicoViewCommentControl"
             x:Name="CommentControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" xmlns:local="clr-namespace:NicoView.View"
             xmlns:vm="clr-namespace:NicoView.ViewModel"
             DataContext="{Binding NicoViewCommentControlViewModel,Mode=OneWay,Source={StaticResource locator}}" 
             d:DesignHeight="300" d:DesignWidth="300" Loaded="CommentControl_Loaded">


    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
                
            <RowDefinition Height="Auto"/>

            <RowDefinition x:Name="UnderRowDefinition"   />

        </Grid.RowDefinitions>



        <local:NicoViewCommentViewControl x:Name="MainCommentListView" DataContext="{Binding MainCommentListViewModel,Mode=OneWay,Source={StaticResource locator}}" Grid.Row="0" />


        <GridSplitter Grid.Row="1"  VerticalAlignment="Center" HorizontalAlignment="Stretch" Height="5" ResizeDirection="Rows"  >
            <GridSplitter.Style>
                <Style TargetType="{x:Type GridSplitter}">
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding CommentWriteMode, Source={StaticResource settings}}" Value="Simple" >
                            <Setter Property="Visibility" Value="Collapsed"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </GridSplitter.Style>

        </GridSplitter>

        <!-- グリッドを挟まないとVisibilityが反映されない -->
        <local:NicoViewCommentWriteFrameControl x:Name="CommentWriteControl" Grid.Row="2"  />



    </Grid>
</UserControl>
